package com.Eastiy.EXO.View;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;

public class NewView extends LinearLayout {
    public NewView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
    }

    public NewView(Context context, Object obj, Object obj2, String str, Object obj3, int i, Object obj4, Object obj5, View.OnClickListener onClickListener) {
        super(context);
        if (!(obj == null || obj2 == null)) {
            setLayoutParams(new LinearLayout.LayoutParams(((Integer) obj).intValue(), ((Integer) obj2).intValue()));
        }
        if (str == "LT") {
            setGravity(51);
        } else if (str == "LC") {
            setGravity(19);
        } else if (str == "LB") {
            setGravity(83);
        } else if (str == "CT") {
            setGravity(49);
        } else if (str == "CC") {
            setGravity(17);
        } else if (str == "CB") {
            setGravity(81);
        } else if (str == "RT") {
            setGravity(53);
        } else if (str == "RC") {
            setGravity(21);
        } else if (str == "RB") {
            setGravity(85);
        }
        if (obj3 != null) {
            setOrientation(((Integer) obj3).intValue());
        }
        if (i == 0) {
            setBackgroundDrawable(new ColorDrawable(Color.parseColor((String) obj4)));
        } else if (i == 1) {
            setBackgroundDrawable(ASUI.roundBG(obj4, obj5, (String) null, (Object) null));
        } else if (i == 2) {
        }
        if (onClickListener != null) {
            setOnClickListener(new View.OnClickListener(this, onClickListener) {
                private final NewView this$0;
                private final View.OnClickListener val$set;

                {
                    this.this$0 = r1;
                    this.val$set = r2;
                }

                static NewView access$0(AnonymousClass100000000 r1) {
                    return r1.this$0;
                }

                @Override
                public void onClick(View view) {
                    this.val$set.onClick(view);
                }
            });
        }
    }

    /* access modifiers changed from: protected */
    @Override
    public void onDraw(Canvas canvas) {
        super.onDraw(canvas);
    }
}
